Comment: Resort Manager Cashier Imported Project
 
[DEFINE REGION: Check Application Requirements]
Get System Setting Windows XP into CHECKSYSTEM
if Variable CHECKSYSTEM not Equals TRUE
  MessageBox: $TITLE$ Setup Error, This product requires at least Windows XP.$NEWLINE$$NEWLINE$Setup cannot continue.
  Terminate Installation
end
Get System Setting 512 MB Physical Memory into CHECKSYSTEM
if Variable CHECKSYSTEM not Equals TRUE
  MessageBox: $TITLE$ Setup Error, This product requires at least 512 MB Physical Memory.$NEWLINE$$NEWLINE$Setup cannot continue.
  Terminate Installation
end
[END REGION]
 
[DEFINE REGION: Check/Install Application Pre-Requisites]
 
[DEFINE REGION: Check Application Pre-Requisites]
Comment: Check setup pre-requisites
Set Variable PREREQ to FALSE
Set Variable PRELIST to 
[compiler if Variable BUILDMODE not Equals PATCH]
if Variable NEEDSUPGRADE Equals TRUE
  Set Variable PREREQ to TRUE
  Set Variable PRELIST to $PRELIST$$NEWLINE$Previous Version Uninstallation
end
Include Script: checkmsi45
Include Script: checknet10
[compiler end]
[END REGION]
 
[DEFINE REGION: Install Application Pre-Requisites]
Comment: Install setup pre-requisites
if Variable PREREQ not Equals FALSE
  Display Dialog: prereq, wait for dialog to return (modal)
  if Variable WIZARD Equals CANCEL
    Terminate Installation
  end
  Display Dialog: progressprereq, use as progress dialog (non-modal)
  [compiler if Variable BUILDMODE not Equals PATCH]
  if Variable NEEDSUPGRADE Equals TRUE
    Set Variable REMOVEOLD to 
    Set Variable ERROROLD to 
    Install/Remove MSI Package $PRODUCTCODE$[REMOVE=ALL] (get result into variable REMOVEOLD)
    if Variable REMOVEOLD Equals ERROR
      MessageBox: $TITLE$ Setup, Unable to uninstall old version of $TITLE$. Please uninstall it yourself using Control Panel Add-Remove Programs before attempting to install this product.$NEWLINE$$NEWLINE$$ERROROLD$
      Terminate Installation
    end
    if Variable REMOVEOLD Equals REBOOT
      MessageBox: $TITLE$ Setup, Your computer needs to be restarted before $TITLE$ Setup can continue.$NEWLINE$$NEWLINE$Please save your work in all running programs and click OK to restart your computer. Setup will resume once your computer restarts.$NEWLINE$$NEWLINE$If you click CANCEL, setup will exit. You will have to run setup again at a later time to install $TITLE$.
      if Variable REBOOTNOW Equals OK
        Reboot Computer and Resume Setup
      else
        Terminate Installation
      end
    end
    Set Variable MAINTENANCE to FALSE
  end
  [DEFINE WEB MEDIA Microsoft Windows Installer 4.5]
  Include Script: setupmsi45
  [DEFINE WEB MEDIA MSIRUN]
  [DEFINE WEB MEDIA DOTNET]
  Include Script: setupnet10
  [compiler end]
  Hide Dialog
end
[END REGION]
 
[END REGION]
 
[DEFINE REGION: Define Setup Globals]
Comment: Define Setup Components
Define Component: Resort_Manager_Cashier_
 
Comment: Initialize Setup Globals
Get System Setting Windows NT Kernel (NT4, 2000, XP, 2003, Vista, 2008) into ISNT
Comment: Detect Version Number
Set Variable Version9X to 0
Set Variable VersionNT to 0
Get System Setting Windows 95 into OSTMP
if Variable OSTMP Equals TRUE
  Set Variable Version9X to 400
end
Get System Setting Windows 98 into OSTMP
if Variable OSTMP Equals TRUE
  Set Variable Version9X to 401
end
Get System Setting Windows 98 SE into OSTMP
if Variable OSTMP Equals TRUE
  Set Variable Version9X to 401
end
Get System Setting Windows ME into OSTMP
if Variable OSTMP Equals TRUE
  Set Variable Version9X to 409
end
Get System Setting Windows NT4 into OSTMP
if Variable OSTMP Equals TRUE
  Set Variable VersionNT to 400
end
Get System Setting Windows 2000 into OSTMP
if Variable OSTMP Equals TRUE
  Set Variable VersionNT to 500
end
Get System Setting Windows XP into OSTMP
if Variable OSTMP Equals TRUE
  Set Variable VersionNT to 501
end
Get System Setting Windows 2003 into OSTMP
if Variable OSTMP Equals TRUE
  Set Variable VersionNT to 502
end
Get System Setting Language (Numeric) into $SYSLANG$
Get Folder Location System->Program Files Directory into PROGRAMFILES
Get Common Folder Location System->Program Files Directory into COMMONFILES
Get Folder Location Start Menu->Administrative Tools Group into ADMINTOOLS
Get Common Folder Location Start Menu->Programs Group into SHORTCUTFILESALL
Get Folder Location Start Menu->Programs Group into SHORTCUTFILES
if Variable SHORTCUTFILESALL Equals 
  Set Variable SHORTCUTFILESALL to $SHORTCUTFILES$
end
Get Folder Location System->Desktop Directory into DESKTOPDIR
Get Folder Location System->Windows Directory into WINDIR
Get Folder Location System->System Directory into WINSYSDIR
Get Folder Location Taskbar->Quick Launch Directory into QUICKLAUNCHDIR
Get Folder Location WWW->WWWRoot into WWWROOTDIR
[END REGION]
 
[DEFINE REGION: Setup User Interview]
if Variable MAINTENANCE Equals TRUE
  GoTo Label: Maintenance
else
  [compiler if Variable BUILDMODE not Equals PATCH]
  Comment: First Time Install
  Set Variable TARGETDIR to $PROGRAMFILES$\Little Fish Technologies\Resort Manager\
  Set Variable STARTMENU to Resort Manager Cashier
  [compiler end]
end
 
label: Welcome Dialog
Display Dialog: welcome, wait for dialog to return (modal)
if Variable WIZARD Equals CANCEL
  GoTo Label: Main Install
end
[compiler if Variable BUILDMODE not Equals PATCH]
label: License Check
Display Dialog: licensecheck, wait for dialog to return (modal)
if Variable WIZARD Equals BACK
  GoTo Label: Welcome Dialog
else
  if Variable WIZARD Equals CANCEL
    GoTo Label: Main Install
  end
end
label: ReadMe Information
Display Dialog: readme, wait for dialog to return (modal)
if Variable WIZARD Equals BACK
  GoTo Label: License Check
else
  if Variable WIZARD Equals CANCEL
    GoTo Label: Main Install
  end
end
label: User Registration
Display Dialog: registration, wait for dialog to return (modal)
if Variable WIZARD Equals BACK
  GoTo Label: ReadMe Information
else
  if Variable WIZARD Equals CANCEL
    GoTo Label: Main Install
  end
end
label: Setup Type
Display Dialog: setuptype, wait for dialog to return (modal)
if Variable WIZARD Equals BACK
  GoTo Label: User Registration
else
  if Variable WIZARD Equals CANCEL
    GoTo Label: Main Install
  end
end
Comment: TO-DO: Customize your minimum setup here
if Variable MINIMUM Equals TRUE
  Deselect Component: Resort_Manager_Cashier_
else
  if Variable COMPLETE Equals TRUE
    Select Component: Resort_Manager_Cashier_
  end
end
label: Custom Setup
Display Dialog: componentstree (if variable PERSONALIZED is TRUE), wait for dialog to return (modal)
if Variable WIZARD Equals BACK
  GoTo Label: Setup Type
else
  if Variable WIZARD Equals CANCEL
    GoTo Label: Main Install
  end
end
label: Destination Directory
Display Dialog: destination, wait for dialog to return (modal)
if Variable WIZARD Equals BACK
  GoTo Label: Custom Setup
else
  if Variable WIZARD Equals CANCEL
    GoTo Label: Main Install
  end
end
label: Start Menu
Display Dialog: startmenu, wait for dialog to return (modal)
if Variable WIZARD Equals BACK
  GoTo Label: Destination Directory
else
  if Variable WIZARD Equals CANCEL
    GoTo Label: Main Install
  end
end
[compiler end]
label: Start Installation
Display Dialog: startinstallation, wait for dialog to return (modal)
if Variable WIZARD Equals BACK
  [compiler if Variable BUILDMODE not Equals PATCH]
  GoTo Label: Start Menu
  [compiler else]
  GoTo Label: Welcome Dialog
  [compiler end]
else
  GoTo Label: Main Install
end
 
label: Maintenance
Comment: Maintenance Install/Uninstall
wizard loop
Display Dialog: maintenance, wait for dialog to return (modal)
Display Dialog: componentstree (if variable MODIFY is TRUE), wait for dialog to return (modal)
Display Dialog: startinstallation, wait for dialog to return (modal)
end
[END REGION]
 
[DEFINE REGION: Process (Un)Installation]
label: Main Install
Comment: Exit Setup if Wizard Loop cancelled
if Variable WIZARD Equals CANCEL
  Terminate Installation
end
 
Comment: Prepare to install
Set Variable PROGRESSTEXT to Installing $TITLE$
Set Variable SUCCESS to 
Set Variable LASTERROR to 
if Variable ALLUSERS Equals TRUE
  Set Variable SHORTCUTFOLDER to $SHORTCUTFILESALL$\$STARTMENU$
else
  Set Variable SHORTCUTFOLDER to $SHORTCUTFILES$\$STARTMENU$
end
Display Dialog: progress, use as progress dialog (non-modal)
 
Comment: Modify Target System
[DEFINE REGION: Perform uninstallation]
if Variable REMOVE Equals TRUE
  Comment: Uninstall product
  Comment: TO-DO: Insert any additional uninstall commands here
  Delete Native Images for assembly $TARGETDIR$\CustomPrinterLibOPOS.dll
  Delete Native Images for assembly $TARGETDIR$\Ionic.Zip.dll
  Delete Native Images for assembly $TARGETDIR$\Klik.Windows.Forms.SizeLib.v3.2005.dll
  Delete Native Images for assembly $TARGETDIR$\ResortManager.Cashier.BL.dll
  Delete Native Images for assembly $TARGETDIR$\ResortManager.Cashier.Data.dll
  Delete Native Images for assembly $TARGETDIR$\ResortManager.General.dll
  Apply Uninstall (get result into variable SUCCESS)
  Set Variable PROGRESS to 100
else
  [END REGION]
  [DEFINE REGION: Perform First Time or Maintenance Installation]
  Comment: Install/Re-Install product
  Create Shortcut $SHORTCUTFOLDER$\Uninstall to $UNINSTALLLINK$
  Install Files D:\DevBuild\BuildSource\Resort Manager VS2010\RMCashier\bin\RMCashier.exe to $TARGETDIR$
  Install Files D:\DevBuild\BuildSource\Resort Manager VS2010\RMCashier\bin\RMCashier.exe.config to $TARGETDIR$
  Install Files D:\DevBuild\BuildSource\Resort Manager VS2010\RMCashier\bin\Logging.xml to $TARGETDIR$
  Install Files D:\DevBuild\BuildSource\Resort Manager VS2010\RMCashier\bin\image\*.* to $TARGETDIR$\image, include subfolders
  Install Files D:\DevBuild\BuildSource\Resort Manager VS2010\RMCashier\bin\Keyboards\*.* to $TARGETDIR$\Keyboards, include subfolders
  Install Files D:\DevBuild\BuildSource\Resort Manager VS2010\RMCashier\bin\xml\*.* to $TARGETDIR$\xml, include subfolders
  Get Component Resort_Manager_Cashier_ Selection State into Variable SELECTED
  if Variable SELECTED Equals TRUE
    Comment: TO-DO: Customize the Web Media Block name and URL here
    [DEFINE WEB MEDIA Resort_Manager_Cashier_]
    Comment: Feature  {MSI Code} >>
    Comment: Component Interop.KBDLib.dll >>
    Comment: << Component Interop.KBDLib.dll.
    Comment: Component ISRegistryComponent >>
    Create Folder $TARGETDIR$
    Write Registry Key HKLM\SYSTEM\CurrentControlSet\Services\Eventlog\Resort Manager\, 
    Write Registry Key HKLM\SYSTEM\CurrentControlSet\Services\Eventlog\Resort Manager\MaxSize, 524288
    Write Registry Key HKLM\SOFTWARE\Microsoft\MSDTC\Security\NetworkDtcAccessAdmin, 1
    Write Registry Key HKLM\SOFTWARE\Microsoft\MSDTC\Security\NetworkDtcAccess, 1
    Write Registry Key HKLM\SOFTWARE\Microsoft\MSDTC\Security\, 
    Write Registry Key HKLM\SOFTWARE\Microsoft\MSDTC\Security\XaTransactions, 1
    Write Registry Key HKLM\SOFTWARE\Microsoft\MSDTC\Security\NetworkDtcAccessTransactions, 1
    Write Registry Key HKLM\SOFTWARE\Microsoft\MSDTC\Security\NetworkDtcAccessTip, 0
    Write Registry Key HKLM\SOFTWARE\Microsoft\MSDTC\Security\NetworkDtcAccessOutbound, 1
    Write Registry Key HKLM\SOFTWARE\Microsoft\MSDTC\Security\NetworkDtcAccessInbound, 1
    Write Registry Key HKLM\SOFTWARE\Microsoft\MSDTC\Security\NetworkDtcAccessClients, 1
    Write Registry Key HKLM\SYSTEM\CurrentControlSet\Services\Eventlog\Resort Manager\Resort Manager\, 
    Write Registry Key HKLM\SYSTEM\CurrentControlSet\Services\Eventlog\Resort Manager\AutoBackupLogFiles, 0
    Write Registry Key HKLM\SYSTEM\CurrentControlSet\Services\Eventlog\Resort Manager\Resort Manager\EventMessageFile, C:\Windows\Microsoft.NET\Framework\v2.0.50727\EventLogMessages.dll
    Comment: << Component ISRegistryComponent.
    Comment: Component Keyboard_Files >>
    Comment: << Component Keyboard_Files.
    Comment: Component RegistrySetting.exe >>
    Create Folder $TARGETDIR$
    Delete Files $SHORTCUTFILES$\Little Fish Technologies\\ (when uninstalling)
    Delete Files $SHORTCUTFILES$\Little Fish Technologies\Resort Manager Cashier\\ (when uninstalling)
    Comment: << Component RegistrySetting.exe.
    Comment: Component ResortManager.Client.Tools.dll >>
    Create Folder $TARGETDIR$
    Comment: << Component ResortManager.Client.Tools.dll.
    Comment: Component ResortManager.DAL.dll >>
    Create Folder $TARGETDIR$
    Comment: << Component ResortManager.DAL.dll.
    Comment: Component ResortManager.General.dll >>
    Comment: << Component ResortManager.General.dll.
    Comment: Component RMCashier.exe >>
    Create Shortcut $SHORTCUTFILES$\Little Fish Technologies\Resort Manager Cashier\Resort Manager Cashier to $TARGETDIR$\RMCashier.exe, Pin to Start Menu, Pin to Taskbar
    Get Common Folder Location System->Desktop Directory into TMPVAR75
    Comment: << Component RMCashier.exe.
    Comment: Component AllOtherFiles2 >>
    Comment: << Component AllOtherFiles2.
    Comment: Component AllOtherFiles1 >>
    Comment: << Component AllOtherFiles1.
    Comment: Component log4net.dll >>
    Comment: << Component log4net.dll.
    Comment: Component AllOtherFiles >>
    Comment: << Component AllOtherFiles.
    Comment: Component Ionic.Zip.dll >>
    Comment: << Component Ionic.Zip.dll.
    Comment: Component Interop.NetFwTypeLib.dll >>
    Comment: << Component Interop.NetFwTypeLib.dll.
    Comment: Component ResortManager.Cashier.BL.dll >>
    Comment: << Component ResortManager.Cashier.BL.dll.
    Comment: Component CustomPrinterLibOPOS.dll >>
    Comment: << Component CustomPrinterLibOPOS.dll.
    Comment: Component ResortManager.Cashier.Data.dll >>
    Comment: << Component ResortManager.Cashier.Data.dll.
    Comment: Component Klik.Windows.Forms.SizeLib.v3.2005.dll >>
    Comment: << Component Klik.Windows.Forms.SizeLib.v3.2005.dll.
    Comment: Component Resort_Manager___Point_of_Sales.chm >>
    Create Folder $TARGETDIR$
    Comment: << Component Resort_Manager___Point_of_Sales.chm.
    Comment: Component Resort_Manager___Point_of_Sales_1057.chm >>
    Create Folder $TARGETDIR$
    Comment: << Component Resort_Manager___Point_of_Sales_1057.chm.
    Comment: Component ResortManager.Cashier.dll >>
    Create Folder $TARGETDIR$
    Comment: << Component ResortManager.Cashier.dll.
    Comment: Component Interop.Cardlock.dll >>
    Comment: << Component Interop.Cardlock.dll.
    Comment: << Feature  {MSI Code}.
  end
  [compiler if Variable BUILDMODE Equals PATCH]
  Apply Patch (get result into variable SUCCESS)
  [compiler else]
  if Variable ADVERTISE Equals TRUE
    Apply Advertised (get result into variable SUCCESS)
  else
    Install Assembly D:\DevBuild\BuildSource\Resort Manager VS2010\RMCashier\bin\CustomPrinterLibOPOS.dll to $TARGETDIR$
    Install Assembly D:\DevBuild\BuildSource\Resort Manager VS2010\RMCashier\bin\Ionic.Zip.dll to $TARGETDIR$
    Install Assembly D:\DevBuild\BuildSource\Resort Manager VS2010\RMCashier\bin\Klik.Windows.Forms.SizeLib.v3.2005.dll to $TARGETDIR$
    Install Assembly D:\DevBuild\BuildSource\Resort Manager VS2010\RMCashier\bin\ResortManager.Cashier.BL.dll to $TARGETDIR$
    Install Assembly D:\DevBuild\BuildSource\Resort Manager VS2010\RMCashier\bin\ResortManager.Cashier.Data.dll to $TARGETDIR$
    Install Assembly D:\DevBuild\BuildSource\Resort Manager VS2010\RMCashier\bin\ResortManager.General.dll to $TARGETDIR$
    Apply Install (get result into variable SUCCESS)
    if Variable SUCCESS not Equals ERROR
      if Variable SUCCESS not Equals CANCEL
        Generate Native Images for assembly $TARGETDIR$\ResortManager.General.dll
        Generate Native Images for assembly $TARGETDIR$\ResortManager.Cashier.Data.dll
        Generate Native Images for assembly $TARGETDIR$\ResortManager.Cashier.BL.dll
        Generate Native Images for assembly $TARGETDIR$\Klik.Windows.Forms.SizeLib.v3.2005.dll
        Generate Native Images for assembly $TARGETDIR$\Ionic.Zip.dll
        Generate Native Images for assembly $TARGETDIR$\CustomPrinterLibOPOS.dll
      end
    end
  end
  [compiler end]
  Set Variable PROGRESS to 100
end
[END REGION]
[END REGION]
 
[DEFINE REGION: Finish Setup]
Display Dialog: finish, wait for dialog to return (modal)
Hide Dialog
Comment: End of Installation
if Variable SILENT Equals FALSE
  if Variable REBOOTCOMPUTER Equals TRUE
    if Variable SUCCESS Equals REBOOT
      Reboot Computer
    end
  end
  if Variable RUNAPP Equals TRUE
    if Variable SUCCESS Equals COMPLETE
      if Variable REMOVE Equals FALSE
        Comment: TO-DO: Insert command that starts your application here
      else
      end
    end
  end
end
[END REGION]
